<!--{include header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<!--{if $order}-->
<div id="ads_content_box" class="coupons-box clear mainwide">
	<div class="box clear">
		<div class="ads_top"></div>
		<div id="ads_content">
			您已经下过订单，但还没有付款。<a href="/order/check.php?id={$order['id']}">查看订单并付款</a>
		</div>
		<div class="ads_bottom"></div>
	</div>
</div>
<!--{/if}-->

	<div id="deal-default" class="l">
		
		<!--{loop $teams $index $team}-->
		<div id="team_{$team['id']}" >
		<!--{include block_team_share}-->
		<div class="content">
			<div class="cityimg"><img src="/static/css/i/area/{$city['ename']}.png"></div>
			<div id="deal-intro" class="cf">
				<div class="conleft_title">
					<h1><!--{if $team['close_time']==0}--><a class="deal-today-link" href="/team.php?id={$team['id']}">今日第${$index+1}团：</a><!--{/if}--><a href="/team.php?id={$team['id']}" title="{$team['title']}" style="color:black;">{$team['title']}</a></h1>
				</div>
                <div class="main">
                    <div class="deal-buy">
                        <div class="deal-price-tag"></div>
					<!--{if ($team['state']=='soldout')}-->
                        <p class="deal-price"><strong>{$currency}${moneyit($team['team_price'])}</strong><span class="deal-price-soldout"></span></p>
					<!--{elseif $team['close_time']}-->
                        <p class="deal-price"><strong>{$currency}${moneyit($team['team_price'])}</strong><span class="deal-price-expire"></span></p>
					<!--{else}-->
                        <p class="deal-price"><strong>{$currency}${moneyit($team['team_price'])}</strong><span><a ${$team['begin_time']<time()?'href="/team/buy.php?id='.$team['id'].'"':''}><img src="/static/css/i/button-deal-buy.gif" /></a></span></p>
					<!--{/if}-->
                    </div>
                    <table class="deal-discount">
                        <tr>
                            <th>原价</th>
                            <th>折扣</th>
                            <th>节省</th>
                        </tr>
                        <tr>
                            <td>{$currency}${moneyit($team['market_price'])}</td>
							<td>${team_discount($team)}</td>
                            <td>{$currency}{$team['discount_price']}</td>
                        </tr>
                    </table>
					<!--{if $team['close_time']}-->
                    <div class="deal-box deal-timeleft deal-off" id="deal-timeleft" curtime="{$now}000" diff="${$one['end_time']-$now}000">
						<h3>本团购结束于</h3>
						<div class="limitdate"><p class="deal-buy-ended">${date('Y-m-d', $team['close_time'])}<br>${date('H:i:s', $team['close_time'])}</p></div>
					</div>
					<!--{else}-->
                    <div class="deal-box deal-timeleft deal-on" id="deal-timeleft" curtime="{$now}000" diff="${$one['end_time']-$now}000">
						<h3>剩余时间</h3>
						<div class="limitdate"><ul id="counter">
						<!--{if $team['left_day']>0}-->
							<li><span>{$team['left_day']}</span>天</li><li><span>{$team['left_hour']}</span>小时</li><li><span>{$team['left_minute']}</span>分钟</li>
						<!--{else}-->
							<li><span>{$team['left_hour']}</span>小时</li><li><span>{$team['left_minute']}</span>分钟</li><li><span>{$team['left_time']}</span>秒</li>
						<!--{/if}-->
						</ul></div>
					</div>
					<!--{/if}-->

				<!--{if $team['close_time']==0}-->
					<!--{if $team['state']=='none'}-->
					<div class="deal-box deal-status" id="deal-status">
						<p class="deal-buy-tip-top"><strong>{$team['now_number']}</strong> 人已购买</p>
						<div class="progress-pointer" style="padding-left:{$team['bar_size']-$team['bar_offset']}px;"><span></span></div>
						<div class="progress-bar"><div class="progress-left" style="width:{$team['bar_size']-$team['bar_offset']}px;"></div><div class="progress-right "></div></div>
						<div class="cf"><div class="min">0</div><div class="max">{$team['min_number']}</div></div>
						<p class="deal-buy-tip-btm">还差 <strong>{$team['min_number']-$team['now_number']}</strong> 人到达最低团购人数</p>
					</div>
					<!--{else}-->
					<div class="deal-box deal-status deal-status-open" id="deal-status">
						<p class="deal-buy-tip-top"><strong>{$team['now_number']}</strong> 人已购买</p>
					<!--{if $team['max_number']&&$team['max_number']>$team['now_number']}-->
						<p class="deal-buy-tip-btm">本单仅剩：<strong>{$team['max_number']-$team['now_number']}</strong>份，欲购从速</p>
					<!--{/if}-->
						<p class="deal-buy-on" style="line-height:200%;"><img src="/static/css/i/deal-buy-succ.gif"/> 团购成功！ <!--{if $team['max_number']>$team['now_number']||$team['max_number']==0}--><br/>还可以继续购买<!--{/if}--></p>
					<!--{if $team['reach_time']}-->
						<p class="deal-buy-tip-btm">${date('G点i分', $team['reach_time'])}达到最低团购人数：<strong>{$team['min_number']}</strong>人</p>
					<!--{/if}-->
					</div>
					<!--{/if}-->
				<!--{else}-->
					<div class="deal-box deal-status deal-status-{$team['state']}" id="deal-status"><div class="deal-buy-{$team['state']}"></div><p class="deal-buy-tip-total">共有 <strong>{$team['now_number']}</strong> 人购买</p></div> 
				<!--{/if}-->
				</div>
				<div class="side">
                     <div class="deal-buy-cover-img" id="team_images">
						<a href="/team.php?id={$team['id']}" title="{$team['title']}">
							<img src="${team_image($team['image'])}" width="440" height="280" />
						</a>
					</div>
					<div class="auth"><!--{if $team['authenticate']==1}--><img border="0" src="/static/css/i/biz-authenticate.png"><!--{/if}--></div>
                    <div class="digest"><br />${nl2br(strip_tags($team['summary']))}</div>
                </div>
            </div>
		</div>
    </div>
<!--{/loop}-->
    
</div>
	<div id="sidebar">
		<!--{include block_side_invite}-->
		<!--{include block_side_bulletin}-->
		<!--{include block_side_flv}-->
		<!--{include block_side_others_seconds}-->
		<!--{include block_side_others}-->
		<!--{include block_side_vote}-->
		<!--{include block_side_business}-->
		<!--{include block_site_changelog}-->
		<!--{include block_side_subscribe}-->
	</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->
<script type="text/javascript" src="http://static.connect.renren.com/js/v1.0/FeatureLoader.jsp"></script>
<!--{if !$login_user}-->

  <script type="text/javascript">
	XN_RequireFeatures(["EXNML"], function()
	{
	  XN.Main.init("58f2b48818d446be97a1827dd10d89f2", "/xd_receiver.html", {"forceLoginPopup": false,"ifUserConnected":"/xiaonei/connect_ok.php"});
	});
</script>
<!--{/if}-->
<!--{include footer}-->
